package com.atguigu.gulimall.member.service;

import com.atguigu.common.to.MemberLoginTo;
import com.atguigu.common.to.MemberRegistTo;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.member.entity.MemberEntity;
import com.atguigu.gulimall.member.exception.PhoneExistedException;
import com.atguigu.gulimall.member.exception.UsernameExistedException;
import com.atguigu.gulimall.member.vo.SocialUser;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * 会员
 *
 * @author gyhe10
 * @email gyhe10@163.com
 * @date 2024-08-17 12:40:41
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(MemberRegistTo to);

    void checkPhoneUnique(String phone) throws PhoneExistedException;

    void checkUsernameUnique(String username) throws UsernameExistedException;

    MemberEntity login(MemberLoginTo to);

    MemberEntity oauthLogin(SocialUser socialUser) throws Exception;
}

